package software.lib.entity.graph;


/**
 * @author sunfiyes 2016年12月12日
 * 节点类
 */
public class Node implements Comparable<Node> {
	@Override
	public int compareTo(Node o) {
		return id - o.id;
	}

	public int id;
	public String type;
	public String label;
	public Node(int id, String label){
		this.id = id;
		this.type = "1";
		this.label = label;
	}
	
	public Node(int id, String type, String label){
		this.id = id;
		this.type = type;
		this.label = label;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}


	@Override
	public String toString() {
		return "Node{" +
				"id=" + id +
				", type='" + type + '\'' +
				", label='" + label + '\'' +
				'}';
	}
}
